﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace AspDotNet.Core3.Mvc.Study.ProductDemo.Models
{
    public interface IProductOperation
    {
        /// <summary>
        /// 查询产品
        /// </summary>
        /// <param name="id">产品ID</param>
        /// <returns></returns>
        Product GetProductByID(int id);

        /// <summary>
        /// 获取所有产品
        /// </summary>
        /// <returns></returns>
        List<Product> GetProducts();

        /// <summary>
        /// 获取分页
        /// </summary>
        /// <param name="start">起始索引</param>
        /// <param name="end">结束索引</param>
        /// <returns></returns>
        List<Product> GetPagingProducts(int start, int end);
    }
}
